<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css"/>
    <!-- <link rel="stylesheet" type="text/css" href="../css/menu.css" /> -->
    <link rel="stylesheet" type="text/css" href="../css/mzui/css/mzui.min.css" />
    <style>
     th{
            text-align: center;
        }
        td{
            text-align: center;
        }
        html,body{
            background-color:#fff;
        }
       .infoTop{
	background-color:#2f889a;
	height:73px;
	/* border-bottom:1px solid #994c00; */
	text-align:center;
	/* border:1px solid red; */
}
.infoTop a{
	position:absolute;
	height:37px;
	padding:34px 20px 0 20px;
	top:0px;
	left:0px;
	cursor:pointer;
}
.infoTop img{
	height:25px;

}
.infoTop span{
	position:absolute;
	top:24px;
	left:150px;
	font-size:20px;
	height:50px;
	line-height:50px;
	color:#fff;
	cursor:default;
}
.infoTop .nav{
	float:right;
	width:25px;
	height:25px;
	margin:35px 15px auto 20px;
}

		/*  订单列表css  start  */
		.orderbox .bigBG {
			background-color: #fff;
			margin-top: 5px;
		}
		.orderbox .orderNum {
			font-size: 16px;
			line-height: 32px;
			border-bottom: 2px solid #e5e5e5;
			position: relative;

		}
		.orderbox .orderNum span {
			display: block;
			color: #666;
			margin: 0 15px;
			/* border:1px solid red; */
		}
		.orderbox .orderNum .delete {
			position: absolute;
			top: 13px;
			right: 15px;
			width: 18px;
			height: 22px;
			cursor: pointer;
			outline: none;
			border: none;
			background: none;
			background-image: url("../../image/order/icon-del1.png");
			background-repeat: no-repeat;
			background-size: 20px 20px;
		}
		.orderbox .orderNum .delete:hover {
			background-image: url("../../image/order/icon-del2.png");
		}
		.orderbox .orderNum .delete:active {
			background-image: url("../../image/order/icon-del2.png");
		}


		/* 订单删除按钮遮罩层  start */
	.delbg{
		display:none;
		width:100%;
		height:100%;
		position:fixed;
	 	top:0;
	 	left:0;
	 	z-index:999999;
		background-color:#000;
		background-color:rgba(0,0,0,0.6);
	}
	 .delbg .show{
		width:280px;
		height:160px;
		margin:0 auto;
		margin-top:140px;
		border-radius:4px;
		background-color:#fff;
		overflow:auto;
	}
	 .delbg .show .showtext{
		margin:0;
		padding:0;
		margin-top:40px;
		font-size:20px;
		line-height:20px;
		color:#333;
		text-align:center;
		/* border:1px solid red; */
	}
	 .delbg .show .btnalign{
		text-align:center;
		margin-top:20px;
		/* border:1px solid red; */
	}
	 .delbg .show .btnclose{
		margin:0;
		padding:0;
		border:none;
		outline:none;
		border-radius:4px;
		width:60px;
		height:30px;
		color:#fff;
		font-family:"微软雅黑";
		font-size:16px;
		cursor:pointer;
		background-color:#ff7f00;
	}
	 .delbg .show .btnsure{
		margin:0;
		padding:0;
		margin-left:32px;
		border:none;
		outline:none;
		text-decoration:none;
		border-radius:4px;
		width:60px;
		height:30px;
		color:#fff;
		font-family:"微软雅黑";
		font-size:16px;
		cursor:pointer;
		background-color:#ff7f00;
	}
	 .delbg .show .btnclose:hover,
	 .delbg .show .btnsure:hover{
		background-color:#e57300;
	}
	 .delbg .show .btnclose:active,
	 .delbg .show .btnsure:active{
		background-color:#f52222;
	}
	/* 订单删除按钮遮罩层  end */

	 #pullUp {
		color:#C6C5C5;
	    display:none;
		margin:0px;
		background-color:transparent;
		text-align:center;
	}

	 .orderbox .orderText p {
		margin: 0 15px;
		color: #999;
		border-bottom: 1px solid #eee;
		font-size: 14px;
		height: 26px;
		line-height: 26px;
			/* border:1px solid red;  */
	}
	.orderbox .orderbottom {
		height: 36px;
		line-height: 36px;
		border-bottom: 2px solid #e5e5e5;
	}
	.orderbox .orderbottom span {
		margin-left: 15px;
		font-size: 14px;
		color: #999;
	}
	.orderbox .orderbottom button {
		float: right;
		width: 65px;
		height: 28px;
		border-radius: 4px;
		border: none;
		outline: none;
		line-height: 32px;
		font-size: 16px;
		margin-right: 15px;
		margin-top: 4px;
		color: #fff;
		background-color: #D65B5D;
		cursor: pointer;
	}
	.orderbox .orderbottom button:hover {
		background-color: #D65B5D;
	}
	.orderbox .orderbottom button:active {
		background-color: #D65B5D;
	}
	.orderbox .lastP {
		margin: 0;
		padding: 0;
		font-size: 14px;
		line-height: 28px;
		border-bottom: 1px solid #ddd;
		text-align: center;
		cursor: pointer;
	}
	.orderbox .lastP a {
		color: #D65B5D;
		font-size: 15px;
		text-decoration: none;
	}
	/*  订单列表css  end  */
	/* 订单页为空时的友情提示css start */
	#hint {
		text-align: center;
	}
	#hint img {
		width: 40px;
		margin-top: 60px;
	}
	#hint p {
		margin: 0;
		padding: 0;
		margin-top: 10px;
		font-size: 14px;
		color: #999;
	}
	/* 订单页为空时的友情提示css end */
	/* 底部nav空白占位 css  */
	.zero{
	display:block;
	height:60px;
	}
 </style>
</head>
<body>




             <div id="wrapper">
			<ul id="thelist" class="orderbox">
			 <!-- <div class="bigBG">
		         <div class="orderNum">
		           				<span>试块编号：1234567890353536</span>
		           			</div>
		       				<div class="orderText">
		           				<p>入库时间：&nbsp;2017-01-16 01:02:00.000 </p>
		           				<p>产品名称：&nbsp;虚拟制造中心&nbsp;</p>
		           				<p>铸&nbsp;&nbsp;件&nbsp;&nbsp;号：&nbsp;胡倩&nbsp;  </p>
		           				<!--<p>图&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号：&nbsp;胡倩&nbsp;  </p>
		           				<p>材&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;质：&nbsp;胡倩&nbsp;  </p>-->
		           				<!-- <p>顾&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;客：&nbsp;胡倩&nbsp;  </p>
		           				<p>位&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;置：&nbsp;胡倩&nbsp;  </p>
		       				</div>
		       				<div class="orderbottom">
		           				<form id="orderComment" name="orderComment" method="get">
		           				      <span>数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;量：&nbsp;123&nbsp;</span>
		      	     	              <button type="button" id="paysubmit" name="paysubmit" onclick="outStorage('orderId','param.orderList[i].outOfPocket','param.orderList[i].number')">出库</button>

		      	     			 </form>
		           			 </div>
		      	 			  <p class="lastP" >
		      	 			   		<a href="javascript:void(0);" onclick="orderDetail('orderId','orderState','param.orderList[i].deduction','param.orderList[i].dishesNum','param.orderList[i].totalPrices')">查看计划详情</a>
		      	 			   </p>
		       			   </div>-->




			</ul>
	   </div>


</body>
<script type="text/javascript" src="../script/public/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/core/core.js"></script>
<!--<script type="text/javascript" src="../script/mzui/js/mzui.min.js"></script>-->
<script type="text/javascript">
	apiready = function(){

	var searchValue=api.pageParam.searchValue;//铸件号
	//var productName=api.pageParam.productName;//产品名称

	ajaxLocal({blockNumber:searchValue},'blockInventory','listBlockRecordByOutSourcing',function(ret,err){
	     //alert("验证成功!!"+JSON.stringify(ret.list));

		html=$('#thelist').html();//获取maInfo里的HTML
	    if(ret.list!=undefined ||ret.list.length!=0){
	    	for(i = 0; i < ret.list.length; i++){
	    	//alert(ret.listP[i].length);
	    	 html+='<div class="bigBG"><div class="orderNum"><span>试块编号：'+ret.list[i].tbBlockInventory.blockNumber
	    	     +'</span></div><div class="orderText"><p>出库时间：&nbsp;'+ret.list[i].outStorageTime
	    	     +'</p><p>产品名称：&nbsp;'+ret.list[i].tbBlockInventory.product
	    	     +'&nbsp;</p><p>铸&nbsp;&nbsp;件&nbsp;&nbsp;号：&nbsp;'+ret.list[i].tbBlockInventory.castingNum
				 +'&nbsp;</p><p>炉&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次：&nbsp;'+ret.list[i].tbBlockInventory.meltingStove
	    	     +'&nbsp;</p><p>顾&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;客：&nbsp;'+ret.list[i].tbBlockInventory.customer
	    	     +'&nbsp;</p>'
	    	     +'</div><div class="orderbottom"><form id="orderComment" name="orderComment" method="get">'
		         +'<span>数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;量：&nbsp;'+ret.list[i].outNum
	    	     +'&nbsp;</span><button type="button" id="paysubmit" name="paysubmit" onclick="receiveBlock(\''+ret.list[i].objId+'\')">接收</button>'
		      	 +'</form></div></div>'


		      }

		     }else{
		     	api.toast({
                        msg: '暂无信息！',
                        duration:2000,
                        location: 'middle'
                    });
		     }
			   $api.html($api.byId('thelist'), html);

	});
	//右滑打开菜单
//		api.addEventListener({
//		    name:'swiperight'
//		}, function(ret, err){
//		   api.openFrame({
//	           name: 'leftMenu',
//	           url: 'left_menu.html',
//	           rect: {
//		           x:0,
//		           y:0,
//		           w:api.winWidth/2,
//		           h:api.winHeight
//	           }
//         });
//		});

	//测试--不能触屏

	$("#openMenu").click(function(){
		 api.openFrame({
		           name: 'leftMenu',
		           url: 'left_menu.html',
		           rect: {
			           x:0,
			           y:0,
			           w:api.winWidth/2,
			           h:api.winHeight
		           }
		      });
	    });
	};

function changeMa(customer,product,figureNumber,texture,castingNum,productCode,pureTime){
  api.openFrame({
	    name: 'frm_inStorageForOne',
	    url: 'frm_inStorageForOne.html',
	    reload:true,
	    pageParam: {
	        castingNum:castingNum,
	        productName:product,
	        customer:customer,
	        figureNumber:figureNumber,
	        texture:texture,
	        productCode:productCode,
	        pureTime:pureTime
	       },
	    rect: {
		    x:0,
		    y:0,
		    w: 'auto',
			h: 'auto'
	    }
    });

}
function receiveBlock(objId){
api.showProgress({
				    style: 'default',
				    animationType: 'fade',
				    title: '努力加载中...',
				    text: '请稍等...',
				    modal: true
				});
	ajaxLocal({objId:objId},'blockInventory','outSourcingBlock',function(ret,err){
		location.reload();
		api.hideProgress();
	});


}
</script>
</html>
